<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript" charset="utf-8" src="${ctx}/editor/kindeditor-min.js"></script>
<div>
	<form id="f_sight" action="<c:url value='/admin/sight/save.do'/>" method="post" enctype="multipart/form-data">
		<input type="hidden" name="sight.sightid" value="${sight.sightid}">
		<table id="t_sight_detail">
			<tr>
				<th width="75px">类型</th>
				<td>
					<select name="sight.types">
						<option value="1">山</option>
						<option value="2">水</option>
					</select>
				</td>
			</tr>
			<tr>
			<th width="75px">中文名称</th>
				<td>
					<input type="text" name="sight.name" value="${sight.name}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">声明图片</th>
				<td>
					<input type="file" name="image" />
				</td>
			</tr>
			<tr>
			<th width="75px">当前声明图片</th>
				<td>
					<input type="text" name="sight.htmlImage" value="${sight.htmlImage}" />
					<br/>
					<img alt="xx" src="${ctx}/${sight.htmlImage}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">版区</th>
				<td>
					<select name="sight.boardId">
						<ms:board type="allboards" property="${sight.boardId}"></ms:board>
					</select>
				</td>
			</tr>
			<tr>
			<th width="75px">地点</th>
				<td>
					<input type="text" name="sight.cityCode" value="${sight.cityCode}"/>
				</td>
			</tr>
			<tr>
				<th width="75px">描述</th>
				<td>
					<textarea id="sight_description" name="sight.description" rows="150" cols="80" style="width:600px;height:300px"><c:out value='${sight.description}'/></textarea>
				</td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
<script type="text/javascript">
KE.show({
	id : 'sight_description',
	imageUploadJson : ctx+'/h/keditor.do',
	fileManagerJson : ctx + '/editor/jsp/file_manager_json.jsp',
	allowFileManager : true,
	afterCreate : function(id) {
		KE.event.ctrl(document, 13, function() {
			KE.util.setData(id);
			document.forms['sight_description'].submit();
		});
		KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
			KE.util.setData(id);
			document.forms['sight_description'].submit();
		});
	}
});
</script>